package main

//生成GF(2^8)的逆元表
//a*b=1
//3^(loga+logb)=3^255
//b=3^(255-loga)
func GenerateInvTab_8(exp []uint8, log []uint8) (tab []uint8) {
	tab = make([]uint8, 256)
	tab[0] = 0
	tab[1] = 1
	for i := 2; i < 256; i++ {
		tab[i] = exp[255-log[i]]
	}
	return tab
}
